package com.originit.product.server.dto

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.validator.constraints.Range
import javax.validation.constraints.NotEmpty

@ApiModel("购物车下单的商品和数量")
data class CartDTO (@ApiModelProperty("商品id") @NotEmpty(message = "商品id不能为空") var productId:String? = null,
                    @ApiModelProperty("商品数量") @Range(min= 1, message = "下单的商品至少要一个") var productQuantity:Int? = null)